package com.itwn.mapper;

import com.itwn.entity.Role;
import com.itwn.vo.RoleVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(RoleVo record);

    List<Role> selectAllByName(String name);

    int updateByPrimaryKey(Role record);

    RoleVo selectRoleVo(Integer roleId);

    int insertRolePermission(@Param("roleId") Integer roleId, @Param("permissionIds") List<Integer> permissionIds, @Param("date") Date date);

    int deleteRolePermission(Integer roleId);

    int updateRole(RoleVo roleVo);

    List<Role> selectAll();
}